package 观察者模式.JDK实现;


import java.util.Observable;

/**
 * @author zzs
 * @ClassName CurrentDate.java
 * @Description
 * @createTime 2022年05月10日 18:34:00
 */
public class CurrentDate extends Observable {
    private String message;

    public void setMessage(String message) {
        this.message = message;
    }

    public void changed() {
        setChanged();
        notifyObservers(message);
    }

    public String getMessage() {
        return message;
    }
}
